@font-face {
    font-family: "方正黑体简体";
    src: url("C:/Users/是你帅姚去啊/AppData/Local/Microsoft/Windows/Fonts/方正黑体简体.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: '方正书宋简体', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    gap: 20px;
}

.editor-section {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.preview-section {
    flex: 1;
    min-width: 350px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input[type="text"], textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

textarea {
    resize: vertical;
}

.buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    flex: 1;
}

button:hover {
    background-color: #45a049;
}

/* 预览卡片样式 */
.preview-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.preview-card {
    width: 100%;
    aspect-ratio: 3/4;
    background-color: #e6f7f5;
    border-radius: 20px;
    position: relative;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 角落图标 */
.corner-icon {
    position: absolute;
    width: 24px;
    height: 24px;
    z-index: 2;
}

.top-left {
    top: 15px;
    left: 15px;
}

.bottom-right {
    bottom: 15px;
    right: 15px;
}

/* 水印 */
.watermark {
    position: absolute;
    opacity: 0.2;
    font-size: 12px;
    color: #333;
    z-index: 1;
}

.watermark-text {
    white-space: nowrap;
}

.top-right {
    top: 15px;
    right: 15px;
}

.bottom-left {
    bottom: 15px;
    left: 15px;
}

/* 顶部标题 */
.top-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #ccc;
    margin-top: 20px;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

/* 主标题 */
.main-title {
    text-align: left;
    font-size: 24px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 15px;
}

.highlight {
    background-color: #ffde59;
    padding: 0 5px;
}

/* 副标题 */
.sub-title {
    text-align: left;
    font-size: 16px;
    margin-bottom: 20px;
}

/* 内容区域 */
.content-section {
    display: flex;
    margin-top: 10px;
    font-size: 14px;
}

.toc {
    flex: 1;
    padding-right: 10px;
}

.toc-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.toc-item.small {
    font-size: 10px;
    color: #666;
    margin-bottom: 2px;
}

.toc-text {
    max-width: 240px; /* 控制最大宽度，约30个中文字符 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

.toc-line {
    height: 1px;
    background-color: #ccc;
    margin: 5px 0;
}

.toc-content {
    max-height: 150px;
    overflow: hidden;
}

.right-content {
    flex: 1;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.6;
    padding-left: 10px;
}

/* 底部标签 */
.bottom-tag {
    position: absolute;
    bottom: 60px;
    left: 20px;
    font-size: 14px;
    color: #4CAF50;
}

/* 右下角文字 */
.bottom-right-text {
    position: absolute;
    bottom: 40px;
    right: 20px;
    font-size: 14px;
    font-weight: bold;
}

.bottom-dots {
    position: absolute;
    bottom: 25px;
    right: 20px;
    font-size: 14px;
    letter-spacing: 2px;
}

/* 页码 */
.page-number {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* 底部装饰 */
.bottom-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: repeating-linear-gradient(
        45deg,
        #b8e0ff,
        #b8e0ff 10px,
        #d6f0ff 10px,
        #d6f0ff 20px
    );
    opacity: 0.5;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .preview-container {
        margin-top: 20px;
    }
}